import pickle

with open('a.dat','wb') as f:
    name = 'SXT'
    age = 18
    score = [100, 99, 98]
    resume = {'name': name, 'age': age, 'score': score}
    pickle.dump(resume,f)
